//角色列表      模型

//引入mongoose模块
const mongoose = require('mongoose');
const { Schema } = mongoose;

//创建userSchema数据库模型
const roleSchema = new Schema({
    roleName: String,
    remark: String,
    permissionList: {
        checkkeys: [],//全选
        halfCheckkeys: [],//半选
    },
    createTime: {
        type: Date,
        default: Date.now
    },
    updateTime: {
        type: Date,
        default: Date.now
    },
});

//定义user模型并导出
module.exports = mongoose.model('role', roleSchema)